package weblab.tutor;

import utils.UserTasks;
import android.content.Context;
import android.widget.Toast;

public class WebAddUserInterface {
	
    
    Context mContext;   

    /** Instantiate the interface and set the context */
    WebAddUserInterface(Context c) {
        mContext = c;
    }

    /** Show a toast from the web page */
  	//@JavascriptInterface
    public void registerUser(String name, String password, String email) {
    	try{
    		new UserTasks(mContext).execute(name,password,email);
    		Toast.makeText(mContext, "User successfully registered!", Toast.LENGTH_SHORT).show();
    	}
    	catch(Exception e){
    		e.printStackTrace();
    	}
    }
}
